package com.sen.design.principle.openclose;

/**
 * 开闭原则
 */
public class Test {

    public static void main(String[] args) {
        ICourse javaCourse = new JavaDiscountCourse(1, "java设计模式", 999d);
        JavaDiscountCourse discountCourse = (JavaDiscountCourse) javaCourse;
        System.out.println(javaCourse.getId() + "========="
                + javaCourse.getName()
                + "==========="
                + discountCourse.getOriginPrice()
                + "===========" + javaCourse.getPrice());
    }
}
